export default {
    api(name, data, auth) {
        return new Promise((resolve, reject) => {
            if (name == 'jdtrade') {
                wx.navigateToMiniProgram({
                    appId: 'wx91d27dbf599dff74',
                    path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(data.url),
                    extraData: {
                        foo: 'bar',
                    },
                    envVersion: 'release',
                    success(res) {
                        resolve({
                            result: 0,
                            data: res,
                        });
                    },
                });
            } else {
                resolve({
                    result: 0,
                });
            }
        });
    },
};
